from fastapi import APIRouter, Request
import uuid

router = APIRouter(prefix="/api/init", tags=["初始化接口"])

@router.get("/session")
def init_session(request: Request):
    session_id = str(uuid.uuid4())
    # 可以将 session_id 存储到数据库或缓存中，这里简单返回
    return {"session_id": session_id}

@router.get("/conversation")
def init_conversation(request: Request):
    conversation_id = str(uuid.uuid4())
    # 可以将 session_id 存储到数据库或缓存中，这里简单返回
    return {"conversation_id": conversation_id}